package ch.zbw.timeline.domain;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import lombok.Data;

/**
 * Domain class for a setting
 */
@Entity
@SequenceGenerator(name = "id_setting", initialValue = 1, allocationSize = 1)
@Table(name = "setting")
@Data
public class Setting implements Serializable {

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "id_setting", nullable = false)
	private int id;

	@Column(name = "setting", nullable = true)
	private String setting;

	@Column(name = "value", nullable = true)
	private String value;

	public Setting() {
	}

	public Setting(String option, String value) {
		this.setting = option;
		this.value = value;
	}
}
